import Vue from "vue"

import "normalize.css/normalize.css" // A modern alternative to CSS resets
import ElementUI from "element-ui"
import "element-ui/lib/theme-chalk/index.css"
import locale from "element-ui/lib/locale/lang/zh-CN" // lang i18n

import "@/styles/index.scss" // global css

import App from "./App"
import router from "./router"
import store from "./store"
import api from "./api"

import "@/icons" // icon
import "./permission" // permission control

import VueAwesomeSwiper from "vue-awesome-swiper"
import VideoPlayer from "vue-video-player"
import mavonEditor from "mavon-editor"
import CKEditor from "@ckeditor/ckeditor5-vue"

import permission from './components/Permission'
import "mavon-editor/dist/css/index.css"

import rawDisplayer from "./views/draggable/components/raw-displayer.vue";


import onlyNumber from '@/directive/el-input'; //添加此行=>自定义全局指令

// 启用vconsole

// import VConsole from "vconsole"
// var vConsole = new VConsole()

require("video.js/dist/video-js.css")
require("vue-video-player/src/custom-theme.css")
Vue.use(VideoPlayer)
Vue.use(VueAwesomeSwiper)
Vue.use(mavonEditor)
Vue.use(CKEditor)

Vue.component("rawDisplayer", rawDisplayer);

Vue.use(onlyNumber); //添加此行=>使用该全局指令
Vue.use(ElementUI, { locale })
Vue.use(permission)
Vue.config.productionTip = false

Vue.prototype.$api = api

new Vue({
  el: "#app",
  router,
  store,
  render: h => h(App)
})
